package com.jiai.cloud.feign;

import com.jiai.cloud.entity.TGoods;
import org.springframework.cloud.netflix.feign.FeignClient;
<<<<<<< Updated upstream
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
=======
import org.springframework.web.bind.annotation.*;

import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;
>>>>>>> Stashed changes


@FeignClient("authentication")
public interface GoodsAPI {
<<<<<<< Updated upstream
    @RequestMapping("/api/v1/goods/findByAll")
    Object findByAll();

    @RequestMapping("/api/v1/goods/del/{id}")
    Object deleteId(@PathVariable("id") Integer id);

    @RequestMapping("/api/v1/goods/edit")
    Object insertOrUpdate(@RequestBody TGoods tGoods);

    @RequestMapping("/api/v1/goods/findById/{id}")
    Object selectById(@PathVariable("id") Integer id);


    @RequestMapping(value = "/api/v1/goods/findByAll/{page}",method = RequestMethod.GET)
    Object selectPage(@PathVariable("page") Integer page);

    @RequestMapping("/goods/goodslist")
    Object selectList(Object o);
}
=======
    //增
    @RequestMapping(value="/api/v1/goods/addGoods", produces = {"application/json;charset=UTF-8"}, method = POST)
    Object addGoods(@RequestBody TGoods tGoods);

    //删
    @RequestMapping(value="/api/v1/goods/delete/{id}", produces = {"application/json;charset=UTF-8"}, method = POST)
    Object delete(@PathVariable("id") Integer id);

    //查
    @RequestMapping(value="/api/v1/goods/findByAll", produces = {"application/json;charset=UTF-8"}, method = POST)
    Object findByAll();

    //改(有就改，没有就插入)
    @RequestMapping(value="/api/v1/goods/edit", produces = {"application/json;charset=UTF-8"}, method = POST)
    @ResponseBody
    Object edit(TGoods tGoods);
}
>>>>>>> Stashed changes
